<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue中的插槽 slot</title>
    <script src="./vue.js"></script>
</head>
<body>
<div id="app">
    <child>
        <h1>YooLin1c</h1>
    </child>
    <child></child>
</div>
<script>
    Vue.component('child', {
        template: `<div>
                    <p>hello</p>
                    <slot>默认内容</slot>
                   </div>`
    })
    var app = new Vue({
        el: '#app'
    });
</script>
</body>
</html>